<!--
 * @Description: 
 * @Version: 1.0
 * @Autor: gaoluo
 * @Date: 2021-09-13 10:12:50
 * @LastEditors: gaoluo
 * @LastEditTime: 2021-11-04 19:46:23
 * @FilePath: /nhw/src/views/Profile/Information.vue
-->
<template>
  <Layout class="information-container" title="个人信息" border>
    <Cell title="头像" is-link center>
      <VanImage
        width="1.43rem"
        height="1.43rem"
        :src="'/nhw' + userinfo.avatar"
        round
        fit="cover"
      >
        <template #error>
          <img src="https://img01.yzcdn.cn/vant/cat.jpeg" />
        </template>
      </VanImage>
    </Cell>
    <Cell title="姓名" is-link :value="userinfo.userName" />
    <Cell title="性别" is-link :value="userinfo.gender" />
    <Cell title="手机号" is-link :value="userinfo.mobile" />
    <Cell title="部门" is-link :value="userinfo.departName" />
    <Cell title="职位" is-link :value="userinfo.postNam" />
  </Layout>
</template>

<script>
import Layout from "components/Layout";
import { Cell, Image as VanImage } from "vant";

export default {
  name: "Information",

  components: { Layout, Cell, VanImage },

  computed: {
    userinfo() {
      return JSON.parse(window.localStorage.getItem("userInfo"));
    },
  },

  data() {
    return {};
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="less" scoped>
.van-image {
  margin-right: 20px;
  margin-top: 10px;
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
</style>